<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('blind_activities', function (Blueprint $table) {
            $table->id();
            $table->foreignId('admin_id')->constrained()->onDelete('cascade');
            $table->foreignId('blind_id')->constrained('blinds')->onDelete('cascade');
            $table->foreignId('activitie_id')->constrained('activities', 'id', 'activitie_id')->onDelete('cascade');
            $table->decimal('activity_price',10,2 )->comment('活动价格');
            $table->unsignedBigInteger('order')->default(1)->comment('排序');
            $table->string('status')->default('1')->comment('状态');
            $table->string('description', 500)->nullable()->comment('描述');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('blind_activities');
    }
};
